<template>
  <view class="box" v-if="userdata"> 
       <image  :src="ip+'/'+userdata.img" mode="aspectFill"></image>
	   <view class="r">
		   <view class="t">
			   <view class="">{{userdata.name}}</view>
			   <view class="time">{{gettime(text.time)}}</view>
		   </view>
		   <view class="b">{{text.spkeak}}</view>
	   </view>
  </view>
</template>

<script setup>
		import gettime from '@/utils/gettime.js'
	import { ip } from '../../utils/getinfo';
	const prop=defineProps(['id',"text"])
	import {userfind} from '@/api/index.js'
	import {onMounted,ref} from 'vue'
	const userdata=ref()
	onMounted(()=>{
		getuserdata()
	})
	const getuserdata=async()=>{
		const rudata=await userfind(prop.id)
		userdata.value=rudata.data
	}
</script>

<style lang="scss" scoped>
	.box{
		height: 100%;
		width: 100%;
		display: flex;
		image{
			height: 100rpx;
			width: 100rpx;
			border-radius: 50%;
			margin:10rpx ;
		}
		.r{
			flex: 1;
			overflow: hidden;
			display: flex;
			flex-direction: column;
			padding-left: 10rpx;
			>view{
			      width: 100%;	
				  flex: 1;
				  display: flex;
				  font-size: 25rpx;

			}
			.t{
				font-size: 28rpx;
				font-weight: 700;
				align-items: flex-end;
				padding:0 50rpx 10rpx 0;
				justify-content: space-between;
				.time{
					font-size: 25rpx;
					font-weight: normal;
				}
			}
			.b{
				color: #7b7b7b;
			}
		}
	}
</style>